package com.ruoyi.api.abuwx.api;

import com.ruoyi.api.abuwx.domain.dto.UserDto;
import com.ruoyi.api.abuwx.service.UserService;
import com.ruoyi.common.annotation.SaClientCheckLogin;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @description 用户模块API
 */
@SaClientCheckLogin
@RestController
@RequestMapping("/api/abuwx")
@Api(tags = "客户端-用户模块API")
public class UserApi {

    @Autowired
    private UserService userService;


//    @ApiOperation("用户信息")
    @GetMapping("/info")
    public AjaxResult info () {
        return userService.userInfo();
    }

//    @ApiOperation("用户保存")
    @PostMapping("/save")
    public AjaxResult addressSave (@RequestBody UserDto userDto) {
        return userService.Save(userDto);
    }
}
